package com.lrd.rmqcluster.rmq5.testconsumer;

import com.lrd.rmqcluster.rmq5.MessageProcessor;
import org.apache.rocketmq.common.message.MessageExt;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.nio.charset.StandardCharsets;

@Service
public class TestMessageProcessorService implements MessageProcessor {

    private static final Logger log = LoggerFactory.getLogger(TestMessageProcessorService.class);

    @Override
    public boolean handleMessage(MessageExt msg) {
        String msgBody = new String(msg.getBody(), StandardCharsets.UTF_8);
        //log.info("TestMessageProcessorService|消费消息，msgBody={}", msgBody);
        return true;
    }
}
